1. Field of the Invention
The present invention relates to processors and methods for instruction processing and, more particularly, to processors and methods for power mode instruction processing, pursuant to which a generic instruction is used to control the various power saving modes in the device based on a literal value, such as a 3-bit literal associated with the power mode instruction.
2. Description of the Prior Art
Processors, including microprocessors, digital signal processors and microcontrollers, operate by running software programs that are embodied in one or more series of instructions stored in a memory. The processors run the software by fetching instructions from the series of instructions, decoding the instructions and executing them. The processors run the software by fetching instructions from the series of instructions, decoding the instructions and executing the instructions. Processors, including digital signal processors, are conventionally adept at processing instructions that perform power saving. In general, power saving is achieved through specific instructions, which perform one function and one function only. Typically, the power save instruction performs a single function. For example, you may have a wait instruction, which will turn off the clocks to the CPU core, but keep the clocks to the peripherals going and another instruction called sleep, which would perhaps turn the clocks off to everything. These power save instructions make inefficient use of processor resources and do not provide flexibility to perform power save operations.
There is a need for a new method of implementing power mode instructions within a processor that can control the sleep mode entered efficiently. There is a further need for a new method of implementing a power mode instruction that initiate a switch to the clock source configuration based on a literal value, such as a 3-bit literal, associated with the power mode instruction. There is also a need turn off power to peripheral modules on an individual basis prior to entering a sleep mode. There is a need for a processor that performs power mode instruction processing, pursuant to which a generic instruction is used to control the various power saving modes in the device based on a literal value, such as a 3-bit literal, associated with the power mode instruction.